package com.ayu.shortlink.admin.config;

import com.ayu.shortlink.admin.idempotent.NoRepeatSubmitAspect;
import lombok.RequiredArgsConstructor;
import org.redisson.api.RedissonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 幂等配置类
 */
@Configuration
@RequiredArgsConstructor
public class IdempotentConfiguration {
    private final RedissonClient redissonClient;
    @Bean
    public NoRepeatSubmitAspect noRepeatSubmitAspect(){
        return new NoRepeatSubmitAspect(redissonClient);
    }
}
